package cn.yc.printstream;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

public class PrintWriter_ {
    public static void main(String[] args) throws IOException {
//        PrintWriter printWriter = new PrintWriter(System.out); // 指向显示器
        PrintWriter printWriter = new PrintWriter(new FileWriter("e:\\io\\printwriter.txt")); // 指向显示器
        printWriter.print("hi,Java你好");
        printWriter.close();
    }
}
